import request from '@/utils/request'

// 查询职工基本信息列表
export function listBasicInfo(query) {
  return request({
    url: '/employee/basicInfo/list',
    method: 'get',
    params: query
  })
}

// 查询职工基本信息详细
export function getBasicInfo(employeeId) {
  return request({
    url: '/employee/basicInfo/' + employeeId,
    method: 'get'
  })
}
//修改员工信息
export function getBasicInfoByUserId(userId) {
  return request({
    url: '/employee/basicInfo/byUserId/' + userId,
    method: 'get'
  })
}

// 新增职工基本信息
export function addBasicInfo(data) {
  return request({
    url: '/employee/basicInfo',
    method: 'post',
    data: data
  })
}

// 修改职工基本信息
export function updateBasicInfo(data) {
  return request({
    url: '/employee/basicInfo',
    method: 'put',
    data: data
  })
}

// 删除职工基本信息
export function delBasicInfo(employeeId) {
  return request({
    url: '/employee/basicInfo/' + employeeId,
    method: 'delete'
  })
}
